﻿using QYmall.Core.Common.Emum;
using QYmall.Core.Common.Helper;
using QYmall.Core.Model.Models;
using QYmall.Core.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace QYmall.Core.IServices
{
    /// <summary>
    /// 数据统计接口
    /// </summary>
    public interface IReportMemberService : IBaseService
    {
        /// <summary>
        /// 统计会员注册数量
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetMemberRegisterCountAsync(int top, Expression<Func<Members, bool>> funcWhere,
            WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计会员注册分页列表
        /// </summary>
        Task<PaginationList<Members>> GetMemberRegisterPageAsync(int pageSize, int pageIndex, Expression<Func<Members, bool>> funcWhere,
            string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计会员消费金额
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetMemberAmountCountAsync(int top, Expression<Func<MemberAmountLog, bool>> funcWhere,
            WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计会员消费分页列表
        /// </summary>
        Task<PaginationList<MemberAmountLog>> GetMemberAmountPageAsync(int pageSize, int pageIndex,
            Expression<Func<MemberAmountLog, bool>> funcWhere, string orderBy, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 统计收藏店铺会员列表
        /// </summary>
        Task<IEnumerable<ReportTotalDto>> GetMemberFavoriteCountAsync(int top, Expression<Func<MerchantFavorite, bool>> funcWhere,
            WriteRoRead writeAndRead = WriteRoRead.Read);
    }
}
